home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 101 / CD-ROM 101.iso / compl / maya5ple / Install_MayaPLE5_English.exe / Maya / Data1.cab / modellingValues.mel < prev    next >
Encoding:
Text File  |  2003-07-17  |  2.9 KB  |  88 lines

  1. // Copyright (C) 1997-2002 Alias|Wavefront,
  2. // a division of Silicon Graphics Limited.
  3. //
  4. // The information in this file is provided for the exclusive use of the
  5. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  6. // and incorporate this code into other products for purposes authorized
  7. // by the Alias|Wavefront license agreement, without fee.
  8. //
  9. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  10. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  11. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  12. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  13. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  14. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15. // PERFORMANCE OF THIS SOFTWARE.
  16. //
  17. //
  18. //
  19. //  Alias|Wavefront Script File
  20. //  MODIFY THIS AT YOUR OWN RISK
  21. //
  22. //  Creation Date:  Aug 16, 1996
  23. //  Author:         ms
  24. //
  25. //  Description:
  26. //  Default for the modelling property values.
  27. //
  28.  
  29. proc baseModellingValues( string $toolName, string $ctxCmdName,
  30.                           int $valueOutputStyle, int $valueKeepOriginals,
  31.                           int $valueCurveRange, int $valueRebuild )
  32. //
  33. //  Description:
  34. //        Procedure to get the values of the common optional modelling options.
  35. //
  36. // 
  37. {
  38.     // Both items need connecting in the same manner as these below
  39.     // I have put the connection in another procedure because not all 
  40.     // modeling tools support these value
  41.     int $intVal;
  42.  
  43.     if( $valueOutputStyle ) {
  44.         $intVal = eval( $ctxCmdName + " -q -po " + $toolName );
  45.         radioButtonGrp -e -sl ($intVal + 1) baseModellingOutputOptions;
  46.     }
  47.     if( $valueKeepOriginals ) {
  48.         $intVal = eval( $ctxCmdName + " -q -rpo " + $toolName );
  49.         checkBoxGrp -e -v1 (! $intVal) baseModellingReplaceOptions;        
  50.     }
  51.     if( $valueCurveRange ) {
  52.         $intVal = eval( $ctxCmdName + " -q -rn " + $toolName );
  53.         radioButtonGrp -e -sl ($intVal + 1) baseModellingCurveRangeOptions;
  54.     }
  55.     if( $valueRebuild ) {
  56.         $intVal = eval( $ctxCmdName + " -q -rb " + $toolName );
  57.         checkBoxGrp -e -v1 $intVal baseModellingReplaceOptions;        
  58.     }
  59. }
  60.  
  61. global proc modellingValues( string $toolName, string $ctxcmd,
  62.                              string $name, string $icon,
  63.                              string $helpTag,
  64.                              int $showOutputStyle,
  65.                              int $showKeepOriginals,
  66.                              int $showCurveRange,
  67.                              int $showRebuild )
  68. //
  69. //  Description:
  70. //        Sets the state of the property sheet based on the values
  71. //        in the tool context.
  72. //
  73. {    
  74.     // set my top layout to be the current $parent
  75.     //
  76.     string $parent = (`toolPropertyWindow -q -location` + "|" + $name);
  77.     setParent $parent;
  78.  
  79.     // set property sheet label and icon
  80.     //
  81.     toolPropertySetCommon $toolName $icon $helpTag;
  82.  
  83.     baseModellingValues( $toolName, $ctxcmd,
  84.                          $showOutputStyle, $showKeepOriginals,
  85.                          $showCurveRange, $showRebuild );
  86.     toolPropertySelect $name;
  87. }
  88.